<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="huoyun" uri="/huoyun" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>我的用户中心</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/main.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
	<style>
		table th td{
			text-align:center;
		}
	</style>
  </head>
  <body>
	<div>
		<jsp:include page="../userAdmin/nav.jsp">
			<jsp:param value="nav_main" name="nav"/>
		</jsp:include>
	</div>
	<div class="realCer">
	
	<!--主体部分-->
	<div class="realMain clearfix mt10">
	 <!--左侧菜单-->
	<div class="realLeft" id="meunLeft">
	    <jsp:include page="../userAdmin/leftMenu.jsp">
	    	<jsp:param value="con_nav_main" name="con_nav"/>
	    	<jsp:param value="cargoManagement" name="selectMenu"/>
	    </jsp:include>
    </div>
    <!--中由-->
	<div class="realRight ml10">
			<div class="box">
			   <div class="tit">我的货源列表</div>
			   <div class="con">  
					<table class="listTable">
						<tr>
							<th width="18%">货物名称</th>
							<th width="12%">货物数量</th>
							<th width="22%">起始地</th>
							<th width="11%">车型要求</th>
							<th width="15%">应标截至日期</th>
							<th width="10%">货物现状</th>
							<th width="12%">操作</th>
						</tr>
						<s:if test="cargoPage">
						<s:iterator var="cargoObj" value="cargoPage.objectList">
						<tr>
							<td><s:property value="#cargoObj.title"/></td>		
							<td><s:property value="#cargoObj.amount"/><huoyun:customSelect type="view" mode="measureType" value="${cargoObj.measure }"/></td>
							<td><strong>始：</strong><huoyun:regionSelect type="view" provinceValue="${cargoObj.startProvince }" cityValue="${cargoObj.startCity}" townValue="${cargoObj.startTown}"/><br/>
							    <strong> 终：</strong><huoyun:regionSelect type="view" provinceValue="${cargoObj.destinationProvince}" cityValue="${cargoObj.destinationCity}" townValue="${cargoObj.destinationTown}"/></td>
							<td><s:if test="#cargoObj.carRequired != ''"><huoyun:customSelect type="view" mode="carRequiredType" value="${cargoObj.carRequired }"/></s:if><s:else>无</s:else></td>
							<td><huoyun:dateFormat date="${cargo.bidEndTime }" dateFormat="yyyy-MM-dd HH:mm"/></td>
							
								<s:if test="#cargoObj.status==0">
									<td>等待审核</td>
									<td><a href="<s:url action='preEditCargo.action' namespace='/cargo'><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">修改</a>|
									<a href="<s:url action="viewCargo.action" namespace="/cargo"><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">查看</a>
									</td>
								</s:if>
								<s:elseif test="#cargoObj.status==1">
										<td>审核通过</td>
										<td><a href="<s:url action="viewCargo.action" namespace="/cargo"><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">查看</a>|
										<a href="<s:url action="queryCars.action" namespace="/car"><s:param name='goodsId'><s:property value='#cargoObj.id'/></s:param></s:url>">找车</a>
										</td>
								</s:elseif>
								<s:elseif test="#cargoObj.status==2">
									<td>审核未通过</td>
									<td><a href="<s:url action='preEditCargo.action' namespace='/cargo'><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">修改</a>|
									<a href="<s:url action="viewCargo.action" namespace="/cargo"><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">查看</a>
									</td>
								</s:elseif>
								<s:elseif test="#cargoObj.status==3">
									<td>已生成订单</td>
									<td><a href="<s:url action="viewCargo.action" namespace="/cargo"><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">查看</a>
								</s:elseif>
								<s:else>
									<td>交易完成</td>
									<td><a href="<s:url action="viewCargo.action" namespace="/cargo"><s:param name='cargoId'><s:property value='#cargoObj.id'/></s:param></s:url>">查看</a></td>
								</s:else>
							</tr>
							<s:if test="#cargoObj.status==1">	
								<tr>
									<td colspan="7" style="text-align: right;">
										<s:if test="#cargoObj.inviteCount==0">
											您还没有邀请任何车辆报价,<a href="<s:url action="queryCars.action" namespace="/car"><s:param name='goodsId'><s:property value='#cargoObj.id'/></s:param></s:url>">去邀请>></a>
										</s:if>
										<s:else>
											您已经邀请了<s:property value="#cargoObj.inviteCount"/>辆车报价,<a href="<s:url action="queryCars.action" namespace="/car"><s:param name='goodsId'><s:property value='#cargoObj.id'/></s:param></s:url>">继续邀请>></a>
										</s:else>
										<s:if test="#cargoObj.bidCount==0">
											还没有车辆报价。
										</s:if>
										<s:else>
											已经有<a href="<s:url action="commendCar.action" namespace="/car"><s:param name='goodsId'><s:property value='#cargoObj.id'/></s:param></s:url>"><s:property value="#cargoObj.bidCount"/>辆车</a>报价
										</s:else>	
									</td>
								</tr>
							</s:if>
						</s:iterator> 
						<s:if test="cargoPage.totalPage > 1">
							<tr>
							    <s:url var="queryCargoUrl" action="cargoList.action" namespace="/cargo"></s:url>
								<td colspan="7"><huoyun:page pageNo="${cargoPage.pageNo}" url="${queryCargoUrl}" totalPage="${cargoPage.totalPage}" totalRecord="${cargoPage.totalRecord}"></huoyun:page></td>
							</tr>
						</s:if>				
						</s:if>
					</table>
			</div>
		</div>
	</div>
	<!--中由-->
</div>
</div>
	<div>
		<jsp:include page="/footer.jsp"></jsp:include>
	</div>
    </body>
</html>

